Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow subclassing ValidationError and PydanticCustomError #1413

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Youssefares
Copy link

@Youssefares Youssefares commented Aug 20, 2024

Change Summary

  • Add ValidationError.new
  • Change from_exception_data to classmethod
  • remove @Final decorators.

Related issue number

pydantic/pydantic#9686
#1380
pydantic/pydantic#8092

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @davidhewitt

Copy link

codspeed-hq bot commented Aug 20, 2024

CodSpeed Performance Report

Merging #1413 will not alter performance

Comparing Youssefares:subclass-errors (2d367c8) with main (4113638)

Summary

✅ 155 untouched benchmarks

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.22%. Comparing base (ab503cb) to head (2d367c8).
Report is 155 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1413      +/-   ##
==========================================
- Coverage   90.21%   89.22%   -0.99%     
==========================================
  Files         106      112       +6     
  Lines       16339    17697    +1358     
  Branches       36       41       +5     
==========================================
+ Hits        14740    15790    +1050     
- Misses       1592     1887     +295     
- Partials        7       20      +13     
Files Coverage Δ
src/errors/validation_exception.rs 93.27% <100.00%> (+0.39%) ⬆️
src/errors/value_exception.rs 90.56% <100.00%> (-0.51%) ⬇️

... and 46 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4113638...2d367c8. Read the comment docs.

@Youssefares
Copy link
Author

please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants